<template>

		<view  class="my-promotion">
			<view class="header">
				<view class="name acea-row row-center-wrapper">
					<view>兑换卡数量</view>
					<view class="record" @click="goRecord()">
						购买记录
						<text class="iconfont icon-xiangyou"></text>
					</view>
				</view>
				<view class="num">{{num}}</view>
			</view>
			<view class="list acea-row row-between-wrapper">
				<view class="item acea-row row-center-wrapper row-column" @click="FnPage">
					<image class="imgicon" src="../../../static/dhk.png" mode="widthFix"></text>
						<view>我的兑换卡</view>
				</view>
				<view class="item acea-row row-center-wrapper row-column" @click="NowBuy">
					<image class="imgicon" src="../../../static/gm.png" mode="widthFix"></text>
						<view>立即购买</view>
				</view>

			</view>
		</view>


</template>
<script>
	import {orderexchangeNum} from "@/api/order"
	export default {

		data: function() {
			return {
			num:0
			};
		},
		created() {


		},
		onShow() {
				this.getData()
        setTimeout(this.getData(),2000)
		},
		methods: {
			getData(){
				orderexchangeNum().then(res=>{
					this.num=res.data
					console.log("res");
					console.log(res.data);
				})
			},
			FnPage() {
					this.$yrouter.push("/pages/shop/Goodsduihuan/index2");
			},
			goRecord() {
				this.$yrouter.push("/pages/HzPages/Record/Record");
			},
			NowBuy() {
				this.$yrouter.push("/pages/HzPages/BuyDiziQuan/BuyDiziQuan");
			},



		}
	};
</script>
<style scoped>
	.imgicon {
		margin-bottom: 10upx;
		width: 65upx;
	}


</style>
